package com.emm.yixun.jobs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.emm.yixun.common.app.base.CommonResDTO;
import com.emm.yixun.common.response.Response;
import com.emm.yixun.system.service.NoticeServiceFacade;

/***
 * 员工关怀消息推送
 * 描述:
 * 	当天通知: 对当天过生日及入职周年的员工进行消息推送
 */
@Component
public class UserCarePushMsgCurrJob {
	 private static Logger logger = LoggerFactory.getLogger(UserCarePushMsgCurrJob.class);

	 @Autowired
	 private NoticeServiceFacade noticeServiceFacade;
	 
     @Scheduled(cron="${quartz.cron.userCarePushMsgJob}")
     public void pushCustomerManageMsg(){
    	 logger.info("推送员工关怀消息 job start..........");
    	 Response<CommonResDTO> response = noticeServiceFacade.userCarePushMsgCurr();
    	 if (response.isSuccess()) {
   			logger.info("..........推送员工关怀消息创建成功..........");
   		 } else {
   			logger.info("..........推送员工关怀消息创建失败..........");
   		 }
    	 logger.info("推送员工关怀消息 job end..........");
     }

}
